package com.ssy.lingxi.product.repository.commodity;

import com.ssy.lingxi.product.entity.commodity.member.CommodityMemberUnitPrice;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

import java.util.List;

/**
 * 商品会员价格持久化层
 * @author jw.chen
 * @version 2.0.0
 * @date 2020/1/11
 */
public interface CommodityMemberUnitPriceRepository extends JpaRepository<CommodityMemberUnitPrice,Long>, JpaSpecificationExecutor<CommodityMemberUnitPrice> {
//    List<CommodityMemberUnitPrice> findByCommodityUnitPriceIdInAndCommodityUnitPriceStrategyCommodityMemberListMemberIdAndCommodityUnitPriceStrategyCommodityMemberListMemberRoleId(List<Long> unitPriceAndPicIdList, Long memberId, Long memberRoleId);
    List<CommodityMemberUnitPrice> findByCommodityUnitPriceIdInAndCommodityUnitPriceStrategyIsEnableAndCommodityUnitPriceStrategyShopId(List<Long> unitPriceAndPicIdList, Boolean status, Long shopId);

    void deleteByCommodityUnitPriceStrategyId(Long id);
}
